/*
 * StaffInfoDAO。java
 * 
 * Created Date: 2014年12月2日
 * 
 * Copyright (c) Centling Technologies Co., Ltd.
 * 
 * This software is the confidential and proprietary information of
 * Centling Technologies Co., Ltd. ("Confidential Information"). You shall not
 * disclose such Confidential Information and shall use it only in accordance
 * with the terms of the license agreement you entered into with
 * Centling Technologies Co., Ltd.
 */

package com.centling.bluecollar.staff.DAO;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.List;

import org.apache.commons.lang3.StringUtils;
import org.hibernate.Query;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import com.centling.bluecollar.base.BaseHibernateDAO;
import com.centling.bluecollar.base.page.PageBean;
import com.centling.bluecollar.base.page.Pagination;
import com.centling.bluecollar.customer.entity.EnterpriseCustomer;
import com.centling.bluecollar.customer.entity.OperatePost;
import com.centling.bluecollar.privilege.entity.Account;
import com.centling.bluecollar.staff.entity.StaffInfo;
import com.centling.bluecollar.system.entity.EmploymentNature;
import com.centling.bluecollar.system.entity.StaffSource;

import com.centling.bluecollar.util.StaticConstant;

/**
 * @author chris.wei
 * @version <br>
 *          <p>
 *          在职离职人员管理
 *          </p>
 */
@Repository("staffInfoDAO")
public class StaffInfoDAO extends BaseHibernateDAO {
	
	private static final Logger log = LoggerFactory
			.getLogger(StaffInfoDAO.class);
	/**
	 * 根据ID查询员工基本信息
	 * 
	 * @param id
	 * @return
	 */
	public StaffInfo findById(String id) {
	
		// log.debug("find StaffInfo instance by id:" + id);
		try {
			String hql = "from StaffInfo as d where d.id=?";
			return (StaffInfo) this.getObjectByHQL(hql, id);
		} catch (RuntimeException re) {
			// log.error("find by id failed", re);
			throw re;
		}
	}
	
}
